﻿using System;
using UI;
using UnityEngine;

public class NextSceneTrigger : MonoBehaviour
{
    public int sceneIndex;
    
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.layer == Layers.Player)
        {
            GameManager.LoadMap(sceneIndex);
        }
    }
}